home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Scope
/
Scope Disk #047 (199x)(Scope PD)(US)[WB].zip
/
Scope Disk #047 (199x)(Scope PD)(US)[WB].adf
/
LS22
/
ls.doc
< prev
next >
Wrap
Text File
|
1988-12-21
|
4KB
|
104 lines
LS -- an "improved" directory listing utility to replace the
AmigaDOS DIR and LIST commands.
V1.0 August 1986 Written from scratch by Justin V. McCormick.
V2.0 November 1988 Revised for Lattice 5.0 and made 1.3 compatible.
V2.1 December 1988 Minor size reduction, fixed a few bugs from 2.0.
V2.2 December 1988 Fixed status return and multiple wildcard pathnames.
Notice:
This program is placed in the public domain with the understanding
that the author makes no claims or guarantees with regard to its
suitability for any given application, and that the author assumes no
responsibility for damages incurred by its usage. Any resemblance
of this program to any other program, either living or dead, is
purely coincidental.
Feel free to borrow this code and make millions of dollars from its
sale or commercial use, but please give credit where credit is due.
Synopsis:
Features adaptive columnar listing, versatile sort options,
UNIX-style pattern matching, recursive subdirectory listing, etc!
Usage:
ls [options] [path1] [path2] ...
Options:
-? Help!
-c Show file comment info, -c implies -l
-d Show directory names only
-f Show filenames only
-l Long verbose listing showing filesizes and dates
-n No sort, just spit them out in the order ExNext() returns
-r Reverse sort direction
-s Sorted by size smallest to largest
-t Sorted by date oldest to newest
-R Recursive descent of subdirectories
All arguments are optional. Default is to give short columnar listing,
sorted alphabetically, using the current directory. Alphabetizing is case
insensitive.
Patterns may be matched in the given names, using the UNIX-style '*'
to wildcard any number of characters, and '?' to wildcard a single
character. If you need to specify a pathname with spaces in it like
"Wombat Soup", you need to put quotes around it. LS can process up to 30
separate pathname patterns in one command line.
Known Bugs:
Redirecting the shortlist output to PRT: gives undesirable results,
since I am using relative cursor positioning commands to format the
screen output. I thought about using an array to store a virtual
screen, but my primary goals were to keep the size down and display
speed at a maxiumum. Also, LS cannot pattern match devices (like "dh*:")
or support multiple levels of pattern matching (like "dh0:?/L*.info").
This would involve another level of recursion and groking the Device List.
Changes From 1.0 to 2.0:
o Source code prototyped, linted, traced, optimized, tweaked, etc.
o Made resident ("pseudo-pure") by linking with cres.o from LC 5.0.
o High-volume routines recoded in assembly (lssup.a).
o Now handles multiple paths/files on a command line, up to 30.
o New sort flags, including no sort.
o Enhanced wildcards, understands complex *.?*.* expressions now.
o More efficient ExNext() performance, less ram used for recursion.
o SIGBREAKF_CTRL_C signal (Ctrl-C) cleanly aborts at any point now.
o Command line parser handles quoted pathnames now (LC 5.0 benefit).
o Short listing finally auto-adjusts to new console window sizes!
o Pen color escape codes bypassed when redirecting long output.
o Sorting by size or date is also subsorted alphabetically now.
o Long listing shows new 1.3 file attributes, plus comment indicator.
o File dates are now in international format, YY-MM-DD.
o Fixed listings with files datestamped after 99-12-31 (overflow).
o Fixed listings with files datestamped before 78-01-01 (time < 0).
Changes From 2.0 to 2.1
o Fixed the show comment feature, a last minute bug in 2.0.
o Fixed the "Unknown option ''" message problem.
o Optimized the assembly branches, reduced code size another few bytes.
Changes From 2.1 to 2.2
o Fixed erroneous Status returns.
o Fixed bug with multiple wildcarded pathnames.
o Compiled with LC 5.0 Patch 3 and CAPE 2.0, saved another 46 bytes.
o Eliminated an extra stpcpy(), saved another few bytes.
Don't send me money for this one! Its a Christmas present 8-)
However, if you find any bugs or have any comments I'd like to hear about them!
Justin V. McCormick
8330 E. Quincy Ave., C-312
Denver, CO 80237
Home : 303-290-8429
Work : 303-825-4144
PLINK: JVM
BIX : jmccormick